<template>
  <div>
    <!-- 浏览历史 -->
    <div class="user-data-box">
      <div class="mybox">
        <p class="count">{{ favor.num }}</p>
        <p>收藏店铺</p>
      </div>
      <div class="mybox">
        <p class="count">{{ favor.num }}</p>
        <p>收藏商品</p>
      </div>

      <div class="mybox">
        <p class="count">{{ favor.num }}</p>
        <p>关注商品</p>
      </div>

      <div class="mybox">
        <p class="count">{{ favor.num }}</p>
        <p>我的足迹</p>
      </div>
    </div>

    <!-- 订单状态  -->
    <div class="OrderStatus">
      <div class="p">
        <P>我的订单</P>
      </div>
      <div class="myorder" @click="onOrders">
        <div class="myorderbox">
          <div class="image">
            <img src="../../assets/user/quanbudingdan.png" alt="">
          </div>
          <p>全部订单</p>
        </div>
        <div class="myorderbox">
          <div class="image">
            <img src="../../assets/user/daifukuan.png" alt="">
          </div>
          <p>待付款</p>
        </div>

        <div class="myorderbox">
          <div class="image">
            <img src="../../assets/user/daishouhuo.png" alt="">
          </div>
          <p>待收货</p>
        </div>

        <div class="myorderbox">
          <div class="image">
            <img src="../../assets/user/tuikuan.png" alt="">
          </div>
          <p>退款</p>
        </div>
      </div>

    </div>

  </div>
</template>

<script>
export default {
  //订单组件
  name: 'myOrde',
  data() {
    return {
      favor: {
        num: "1"
      },
    };
  },
 methods:{
  onOrders(){
    this.$router.push("/userorders");
  }
 },

}
</script>

<style scoped>
/* 浏览历史 */
.user-data-box {

  /* 样式设置 */
  width: 98%;
  /* border: 1px solid red; */
  display: flex;
  justify-content: center;
  margin: 0 auto;
  background-color: #fff;
  border-radius: 5px;
  position: relative;
}

.user-data-box .mybox .count {
  position: absolute;
  top: -20px;
  /* left: 50%;
  transform: translateX(-50%);
  background-color: #fff;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 12px; */
  color: red;
}

.user-data-box .mybox {
  position: relative;
  width: 1000px;
  display: flex;
  justify-content: center;
  /* 水平居中 */
  align-items: center;
  /* 垂直居中 */
  margin: 10px 10px 3px 10px;
}



/* 订单状态 */
.OrderStatus {
  width: 98%;
  /* border: 1px solid red; */
  margin: 0 auto;
  border-radius: 5px;
  overflow: hidden;
  /* 可以添加 flex-direction: row; 属性。同时，为了防止子元素溢出父元素，你还需要将 OrderStatus 元素设为 overflow: hidden; */
}

.OrderStatus .p {
  background-color: #fff;
  width: 100%;
  height: 38px;
  border-radius: 5px;
  margin-bottom: 5px;
  line-height: 38px;
  margin-top: -5px;
  padding-left: 8px;
}


/* 下方列表 */

.OrderStatus .myorder {
  display: flex;
  position: relative;
  background-color: #fff;
  align-items: center;
  flex-direction: row;
  justify-content: center;
  /* 可选：水平居中对齐 */
}

.OrderStatus .myorder .myorderbox {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* margin-top: 10px; */
  margin-bottom: -6px;
  position: relative;
  width: 25%;
}

.OrderStatus .myorder .myorderbox .image {
  /* margin-bottom: 5px; */
}

.OrderStatus .myorder .myorderbox .image img {
  width: 41px;
  height: 41px;
}

.OrderStatus .myorder .myorderbox p {
  margin-top: -2px;
}
</style>